#include"myStdio.h"
#include<unistd.h>

#define myfile "test.txt"

int main()
{
    _FILE *fp = _fopen(myfile, "a");
    if(fp == NULL) return 1;

    const char *msg = "hello Linux\n";
    int cnt = 0;
    while(cnt)
    {
        _fwrite(fp, msg, strlen(msg));
        sleep(1);
        cnt--;
    }
    _fclose(fp);
    return 0;
}
